<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
    String msg=(String) request.getAttribute("msg");
    String sname=(String) request.getAttribute("sname");
    String jname = request.getParameter("jname");
    String url = request.getParameter("url");
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新建方案</title>
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css" />
    <link rel="stylesheet" href="../css/jquery.cxcolor.css" />
    <script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/jquery.cxcolor.js" type="text/javascript" charset="utf-8"></script>

</head>
<body>
<body style="background-color: whitesmoke">
<div style="margin-top: 20px;" class="container-fluid">
    <div class="col-md-8 col-xs-8"style="border:solid 2px dimgrey;background-color: black;border-radius: 2%">
        <div class="row"style="height: 50px"></div>
        <div class="row"style="background-color:whitesmoke">
            <form action="../scheme/newscheme" target="_self" method="post"  class="form-horizontal" >
                <input id="jname" name="jname"type="hidden"class="form-control"style="width: 20%" type="text"/><br>
                <div class="col-md-12 form-group"style="margin-top: 20px">
                    <div class="control-label col-md-5"><label style="font-size: 1.2em">方案名称</label></div>
                    <div class="col-md-7"> <input id="sname" name="sname"class="form-control"style="width: 50%" type="text"/></div>
                </div>
                <div class="col-md-6 col-xs-6">

                    <div class="form-group">
                        <div class="control-label col-md-5 "><label >经线</label></div>
                        <div class="col-md-5 "><input id="WarpColor" name="WarpColor"class="form-control"/></div>
                    </div>
                    <div class="form-group">
                        <div class="control-label col-md-5 col-lg-4" > <label>纬线1</label></div>
                        <div class="col-md-5 col-lg-8"><input id="WeftColor1"name="WeftColor1"class="form-control"/></div>
                    </div>
                    <div class="form-group">
                        <div class="control-label col-md-5"><label>纬线2</label></div>
                        <div class="col-md-5"><input id="WeftColor2"name="WeftColor2"class="form-control"/></div>
                    </div>
                    <div class="form-group">
                        <div class="control-label col-md-5"><label>纬线3</label></div>
                        <div class="col-md-5"><input id="WeftColor3"name="WeftColor3"class="form-control"/></div>
                    </div>
                    <div class="form-group ">
                        <div class="control-label col-md-5"> <label>纬线4</label></div>
                        <div class="col-md-5"><input id="WeftColor4"name="WeftColor4"class="form-control"/></div>
                    </div>
                </div>
                <div class="col-md-6 col-xs-6">
                    <div class="form-group">
                        <div class="control-label col-md-4"><label for="MeiShu">枚&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数</label></div>
                        <div class="col-md-4"><input type="text" name="MeiShu" id="MeiShu" class="form-control"style="border-color:#888"/></div>
                        <p>(建议取值:16)</p>
                    </div>
                    <div class="form-group">
                        <div class="control-label col-md-4"><label for="FeiShu">飞&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数</label></div>
                        <div class="col-md-4"><input type="text" name="FeiShu" id="FeiShu" class="form-control"style="border-color:#888"/></div>
                        <p>(建议取值:5)</p>
                    </div>
                    <div class="form-group ">
                        <div class="control-label col-md-4"><label for="WidthResolution">宽度分辨率</label></div>
                        <div class="col-md-4"><input type="text" name="WidthResolution" id="WidthResolution" class="form-control"style="border-color:#888"/></div>
                        <p>(建议取值:6000)</p>
                    </div>
                    <div class="form-group ">
                        <div class="control-label col-md-4"><label for="WarpMiDu">经&nbsp;线&nbsp;密&nbsp;度</label></div>
                        <div class="col-md-4"><input type="text" name="WarpMiDu" id="WarpMiDu" class="form-control"style="border-color:#888"/></div>
                        <p>(建议取值:118)</p>
                    </div>
                    <div class="form-group">
                        <div class="control-label col-md-4"><label for="WeftMiDu">纬&nbsp;线&nbsp;密&nbsp;度</label></div>
                        <div class="col-md-4"><input type="text" name="WeftMiDu" id="WeftMiDu" class="form-control"style="border-color:#888"/></div>
                        <p>(建议取值:23)</p>
                    </div>
                    <div class="form-group">
                        <div class="control-label col-md-4"><label for="Squeeze">挤&nbsp;压&nbsp;程&nbsp;度</label></div>
                        <div class="col-md-4"><input type="text" name="Squeeze" id="Squeeze" class="form-control"style="border-color:#888"/></div>
                        <p>(建议取值:1)</p>
                    </div>
                    <div class="col-md-12"style="text-align: right">
                        <input type="submit" class="btn btn-success" style="width: 80px;margin-right: 20px;" value="提交" >
                    </div>
                </div>
            </form>
            <img src='<%=url%>'style="width: 100%;height: 150px;border-radius: 3%">
        </div></div>

</div>

<script>
    $(function() {

        var msg="<%= msg%>";
        if (msg == "1")
            error("重复");
    });
    document.getElementById("jname").value='<%=jname%>';
    console.log('<%=jname%>');
    $('#WarpColor').cxColor({
        color:'#ffffff'
    });
    $('#WeftColor1').cxColor({
        color:'#ff0000'
    });
    $('#WeftColor2').cxColor({
        color:'#00ff00'
    });
    $('#WeftColor3').cxColor({
        color:'#0000ff'
    });
    $('#WeftColor4').cxColor({
        color:'#000000'
    });
    function getWB(){
        document.getElementById("WB").src="/scheme/show_WenBan?sname="+'<%=sname%>';
    }
    function preview(){
        window.location.href='../preview.jsp?sname='+'<%=sname%>'+'&show=1';
    }
    function error(msg) {
        $("#error").html(msg);
        $("#error").slideDown("slow").delay(1000).slideUp("slow");
    };
</script>
<style>
    .col-md-*{
        padding-left: 0px;
    }
    label{
        text-align: center;
    }
</style>
</body>
</html>